﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FEShop.OpenModel.Common
{
    /// <summary>
    /// 
    /// </summary>

    public class ResultObject
    {
        /// <summary>
        /// 请求结果
        /// </summary>
        public bool Result { get; set; }
        /// <summary>
        /// 状态码
        /// </summary>
        public int Code { get; set; }
        /// <summary>
        /// 返回消息
        /// </summary>
        public string? Message { get; set; }

    }

    /// <summary>
    /// 
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class ResultObject<T> : ResultObject 
    {
        public ResultObject()
        {

        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="result"></param>
        /// <param name="code"></param>
        public ResultObject(bool result, int code)
        {
            this.Result = result;
            this.Code = code;
        }

        public T Data { get; set; }
    }
}
